<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', 'IndexController@index')->middleware('admin');

// Auth::routes();
//Route::get('/home', 'HomeController@index')->name('home');

Route::any('/register', 'IndexController@register')->name('register'); //注册
Route::any('/login', 'IndexController@login')->name('login'); //登录
Route::post('/logout', 'IndexController@logout')->name('logout'); //退出登录
Route::get('/index', 'IndexController@index')->name('index')->middleware('admin'); //管理界面
Route::post('/upUser', 'IndexController@upUser')->name('upUser')->middleware('admin'); //修改用户信息
